# Maintainer: 
# Contributor: Kyle Keen <keenerd@gmail.com>

_pyname=jupyterlab_pygments
pkgname=${_pyname/_/-}
pkgver=0.3.0
pkgrel=1
pkgdesc='Pygments theme using JupyterLab CSS variables'
arch=(any)
url='https://github.com/jupyterlab/jupyterlab_pygments'
license=(BSD)
depends=(python-pygments)
makedepends=(python-build
             python-hatch-jupyter-builder
             python-hatch-nodejs-version
             python-hatchling
             python-installer)
conflicts=(jupyterlab_pygments)
provides=(jupyterlab_pygments)
replaces=(jupyterlab_pygments)
source=(https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz)
sha256sums=('721aca4d9029252b11cfa9d185e5b5af4d54772bb8072f9b7036f4170054d35d')

build() {
  cd $_pyname-$pkgver
  python -m build --wheel --no-isolation --skip-dependency-check
}

package() {
  cd $_pyname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
